package com.trxy.service.impl;

import com.trxy.mapper.CustomerMapper;
import com.trxy.model.Customer;
import com.trxy.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CustomerServiceImpl implements CustomerService {
    @Autowired
    CustomerMapper customerMapper;
    @Override
    public Customer selectByNameAndPassword(String name, String password) {
        Customer customer = customerMapper.selectByNameAndPassword(name,password);
        return customer;
    }

    @Override
    public void addCustomer(String name, String password, String nick) {
        customerMapper.addCustomer(name,password,nick);
    }
}
